﻿@model IEnumerable<FinalOpdracht.Models.Blog>

@{
    ViewBag.Title = "Blog - Index";
}

<h2>Artikelen</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

<div class="CSSTableGenerator" >
	<table >
		<tr> 
			<td>@Html.DisplayNameFor(model => model.title)</td>
			<td>@Html.DisplayNameFor(model => model.description)</td>
            <td></td>
		</tr>
        @foreach (var item in Model) 
        {
            <tr>
        <td>
            @Html.DisplayFor(modelItem => item.title)
        </td>
        <td width="500px">
            @Html.DisplayFor(modelItem => item.description)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.blogID }) |
            @Html.ActionLink("Details", "Details", new { id=item.blogID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.blogID })
        </td>
    </tr>
        }
	</table>
</div>